<?php if (isset($posts)): ?>
    <?php foreach ($posts as $post): ?>
        <div class="clearfix">
            <h3><kbd><?php echo $post['Category']['name_category']; ?></kbd></h3>
            <p class="pull-left"><strong>Thao tác:</strong> 
                <?php echo $this->Html->link('', array('controller' => 'posts', 'action' => 'edit/' . $post['Post']['id']), array('class' => 'glyphicon glyphicon-edit text-edit', 'title' => 'Chỉnh sửa')); ?>
                &nbsp;&nbsp;
                <?php echo $this->Form->postLink(' ', array('action' => 'delete', $post['Post']['id']), array('class' => 'glyphicon glyphicon-trash text-delete', 'title' => 'Xóa'), __('Bạn có chắc xóa bài viết này?', $post['Post']['id'])); ?>
            </p>
        </div>
        <hr />
        <h4 class="text-primary"><?php echo $post['Post']['title']; ?></h4>
        <p><span class="glyphicon glyphicon-time"></span> <em><?php echo $post['Post']['date'] ?></em></p>
        <?php echo $post['Post']['content']; ?>
    <?php endforeach; ?>
<?php endif; ?>

